<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Stimulus360.Controllers.Users.IdeaListViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div class="centerContainer">
            <%Html.RenderPartial("StimulusLeftNavigation"); %>
        <div class="mainInner colViewHdr">
            <div class="projListItem p10">
                <h2> <span class="welText">Welcome</span> <%=Model.UserName%></h2>
            </div>
            <div id="feedbackListContainer">
                <%Html.RenderPartial("IdeasList", Model.Ideas); %>
            </div>
            <br clear="all" />
            <div class="pagerbg">
                <div id="pagerFavIdeaList" class="pager">
                </div>
            </div>
</div>
</div>
<script type="text/javascript" language="javascript">
    $(document).ready(function() {
        tabUrl = "Ideas"; //*** need to set this global variable to redirect the user to the idea feedback page on click of the rating control...
        $("#favoriteIdeasTag").addClass("selected");

        var totalPages_Idea = "<%=Model.Ideas.TotalPages %>";
        if (totalPages_Idea == 1) {
            $(".pagerbg").hide();
        }
        var currentPage = "<%=Model.Ideas.PageIndex%>";
        $("#pagerFavIdeaList").pager({ pagenumber: currentPage, pagecount: totalPages_Idea, buttonClickCallback: PageClick_ProjList });
    });
    PageClick_ProjList = function(pageclickednuber) {
        var favpageIndex = pageclickednuber;
        window.location = "/Users/" + "<%=Model.UserName %>" + "/FavoriteIdeas/Page/" + favpageIndex.toString();
    }


</script>

</asp:Content>

